package com.sunshine.lnuplus.model.Timetable;

import android.content.Context;

import androidx.room.Database;
import androidx.room.Room;
import androidx.room.RoomDatabase;

@Database(entities = TimetableEntity.class,version = 1,exportSchema = false)
public abstract class TimetableDatabase extends RoomDatabase {

    private static TimetableDatabase database;
    static synchronized TimetableDatabase getDatabase(Context context){
        if(database==null) database = Room.databaseBuilder(context.getApplicationContext(),TimetableDatabase.class,"timetable.db").build();
        return database;
    }

    public abstract TimetableDao getTimetableDao();
}
